---
sidebar_label: hasura scripts update-project-v2
sidebar_position: 34
description: Update the Hasura Project from config v1 to v2 using the Hasura CLI
keywords:
  - hasura
  - docs
  - CLI
  - hasura scripts update-project-v2
---

# Hasura CLI: hasura scripts update-project-v2

Update the Hasura Project from config v1 to v2.

## Synopsis

Update the Hasura Project from config v1 to v2 by executing the following actions:

1. Installs a plugin system for CLI
2. Installs CLI Extensions plugins (primarily for actions)
3. Takes a back up of migrations directory
4. Removes all metadata yaml migrations and converts everything to SQL
5. Exports the metadata from server in the new format (multiple files in a directory)
6. Re-write the config.yaml file to new format


```bash
hasura scripts update-project-v2 [flags]
```

**Alias:** update-config-v2

## Examples

```bash
# Read more about v2 configuration for CLI at https://docs.hasura.io

# Update the Hasura Project from config v1 to v2
hasura scripts update-project-v2

# Update the Hasura Project from config v1 to v2 with a different metadata directory:
hasura scripts update-project-v2 --metadata-dir "metadata"
```

## Options

```sass
    --admin-secret string            admin secret for Hasura GraphQL Engine (env "HASURA_GRAPHQL_ADMIN_SECRET")
    --certificate-authority string   path to a cert file for the certificate authority (env "HASURA_GRAPHQL_CERTIFICATE_AUTHORITY")
    --endpoint string                http(s) endpoint for Hasura GraphQL Engine (env "HASURA_GRAPHQL_ENDPOINT")
-h, --help                           help for update-project-v2
    --insecure-skip-tls-verify       skip TLS verification and disable cert checking (default: false) (env "HASURA_GRAPHQL_INSECURE_SKIP_TLS_VERIFY")
    --metadata-dir string             (default "metadata")
```

## Options inherited from parent commands

```sass
--envfile string      .env filename to load ENV vars from (default ".env")
--log-level string    log level (DEBUG, INFO, WARN, ERROR, FATAL) (default "INFO")
--no-color            do not colorize output (default: false)
--project string      directory where commands are executed (default: current dir)
--skip-update-check   skip automatic update check on command execution
```

## SEE ALSO

- [hasura scripts](/hasura-cli/commands/hasura_scripts.mdx) - Execute helper scripts to manage Hasura Projects

_Auto generated by spf13/cobra_
